class Gameover extends egret.DisplayObjectContainer {
    public gallery:egret.Bitmap;
    public overTit:egret.BitmapText;
    public overScore:string;
    public overInfo:egret.BitmapText;
    public overQuan:string;
    private stageW:number;
    private stageH:number;
    public first = new egret.BitmapText;
    public second = new egret.BitmapText;
    public third = new egret.BitmapText;
    constructor(){
        super();
        // 画卷背景
        this.gallery = new egret.Bitmap();
        this.gallery.texture = RES.getRes("gallery_png");  
        // this.gallery.height = this.gallery.width * (864/1185);     
        this.addChild(this.gallery);     

         // 是否通过标题:提示通关成功或者失败
        RES.getResByUrl("resource/assets/level.fnt" , this.gameOverShowScore , this,RES.ResourceItem.TYPE_FONT);

        //获得多少优惠券or其他
        RES.getResByUrl("resource/assets/quanShow.fnt" , this.gameOverShowInfo , this,RES.ResourceItem.TYPE_FONT);

        //底部三个按钮
        RES.getResByUrl("resource/assets/button.fnt" , this.firstButton , this,RES.ResourceItem.TYPE_FONT);
        RES.getResByUrl("resource/assets/button.fnt" , this.secondButton , this,RES.ResourceItem.TYPE_FONT);
        RES.getResByUrl("resource/assets/button.fnt" , this.thirdButton , this,RES.ResourceItem.TYPE_FONT);
        
    }

    public gameOverShowScore(font:egret.BitmapFont):void{
        this.overTit = new egret.BitmapText();
        this.overTit.font = font;   
        this.overTit.scaleX = 0.53;
        this.overTit.scaleY = 0.48;         
        this.overTit.y = 120;      
        this.addChild(this.overTit);
        // this.overTit.text = '成0分'
    }

    
    public gameOverShowInfo(font:egret.BitmapFont):void{
        this.overInfo = new egret.BitmapText();
        this.overInfo.font = font;   
        this.overInfo.scaleX = 0.52;
        this.overInfo.scaleY = 0.6;    
        this.overInfo.y = 190;      
        this.addChild(this.overInfo);
        // this.overInfo.text = '立'
    }

    public firstButton(font:egret.BitmapFont):void{
        this.first.font = font;   
        this.first.scaleX = 0.52;
        this.first.scaleY = 0.6;  
        this.first.x = 95;  
        this.first.y = 295;      
        this.addChild(this.first);
    }

    public secondButton(font:egret.BitmapFont):void{
        this.second.font = font;   
        this.second.scaleX = 0.52;
        this.second.scaleY = 0.6;  
        this.second.x = 245;  
        this.second.y = 295;      
        this.addChild(this.second);
    }

    public thirdButton(font:egret.BitmapFont):void{
        this.third.font = font;   
        this.third.scaleX = 0.52;
        this.third.scaleY = 0.6;  
        this.third.x = 395;  
        this.third.y = 295;      
        this.addChild(this.third);
    }
}
